import request from '../index.js';

//function getProjectRoleInfo(data) {
//    return request({ url: '/MyProject/GetProjectRole', method: 'get', params: data })
//}

function updateUser(data) {
    return request({ url: '/DaUser/Put', method: 'put', data: data });
}
function createUser(data) {
    return request({ url: '/DaUser/Post', method: 'post', data: data });
}
function getUserList(data) {
    return request({ url: '/DaUser/DoPager', method: 'post', data: data })
}
function deleteDaUser(data) {
    return request({ url: '/DaUser/Delete/' + data, method: 'delete' });
}
function getUserByID(data) {
    return request({ url: `/DaUser/Get/${data}`, method: 'get' })
}

function createCustomer(data) {
    return request({ url: '/Customer/Post', method: 'post', data: data });
}

function updateCustomer(data) {
    return request({ url: '/Customer/Put', method: 'put', data: data });
}
function getCustomerByID(data) {
    return request({ url: `/Customer/Get/${data}`, method: 'get' })
}
function getAllCustomer(data) {
    return request({ url: `/Customer/Get`, method: 'get' })
}
function getCustomerList(data) {
    return request({ url: '/Customer/DoPager', method: 'post', data: data })
}
function deleteCustomer(data) {
    return request({ url: '/Customer/Delete/' + data, method: 'delete' });
}

function updateBaseCarryDevice(data) {
    return request({ url: '/BaseCarryDevice/Put', method: 'put', data: data });
}
function createBaseCarryDevice(data) {
    return request({ url: '/BaseCarryDevice/Post', method: 'post', data: data });
}
function getAllBCDList(data) {
    return request({ url: `/BaseCarryDevice/Get`, method: 'get' })
}
function getBaseCarryDeviceList(data) {
    return request({ url: '/BaseCarryDevice/DoPager', method: 'post', data: data })
}
function getBaseCarryDeviceByID(data) {
    return request({ url: `/BaseCarryDevice/Get/${data}`, method: 'get' })
}
function deleteBaseCarryDevice(data) {
    return request({ url: '/BaseCarryDevice/Delete/' + data, method: 'delete' });
}

function updateEnergyDistribution(data) {
    return request({ url: '/BaseEnergyDistribution/Put', method: 'put', data: data });
}
function createEnergyDistribution(data) {
    return request({ url: '/BaseEnergyDistribution/Post', method: 'post', data: data });
}
function getAllBEDList(data) {
    return request({ url: `/BaseEnergyDistribution/Get`, method: 'get' })
}
function getEnergyDistributionList(data) {
    return request({ url: '/BaseEnergyDistribution/DoPager', method: 'post', data: data })
}
function getEnergyDistributionByID(data) {
    return request({ url: `/BaseEnergyDistribution/Get/${data}`, method: 'get' })
}
function deleteEnergyDistribution(data) {
    return request({ url: '/BaseEnergyDistribution/Delete/' + data, method: 'delete' });
}
export default {
    getUserList,
    deleteDaUser,
    updateUser,
    createUser,
    getUserByID,

    getCustomerList,
    getCustomerByID,
    deleteCustomer,
    createCustomer,
    updateCustomer,
    getAllCustomer,

    updateBaseCarryDevice,
    createBaseCarryDevice,
    getBaseCarryDeviceList,
    getBaseCarryDeviceByID,
    deleteBaseCarryDevice,
    getAllBCDList,

    updateEnergyDistribution,
    createEnergyDistribution,
    getEnergyDistributionList,
    getEnergyDistributionByID,
    deleteEnergyDistribution,
    getAllBEDList,
};
